package com.code.mvc.controller;


import com.code.mvc.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * todo
 *
 * @author wangjie
 * @version V1.0
 * @date 2020/1/13
 */
@Controller
public class HelloController {
	
	@Autowired
	HelloService helloService;
	
	
	@ResponseBody
	@RequestMapping("/hello")
	public String hello(){
		String hello = helloService.sayHello("tomcat..");
		return hello;
	}

	/**
	 * /WEB-INF/views/success.jsp
	 * @return
	 */
	@RequestMapping("/suc")
	public String success(){
		return "success";
	}
	

}
